﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
//using Logger = Garlic.CC.Utility.Logger;
using Garlic.DAL;
using Garlic.Infrustructure;
using DAL.BusinessDeal;

namespace Garlic.BLL.BusinessDeal
{
    public class StSpProcessCargoAmountManager
    {
        private StSpProcessCargoAmountDAL DAL = new StSpProcessCargoAmountDAL();
        public string InsertUpdateToTable(int P_Operation_Type, string P_VOY_ID,string vag_id, string P_VAG_GTYPECD,
             string P_VAG_PKG, string P_VAG_TON, string P_VAG_VOL, string P_VAG_REMARK, string P_USER_ID,string P_SCD_ID)
        {
            try
            {
                return DAL.InsertUpdateProcessCargomount(P_Operation_Type, P_VOY_ID, vag_id, P_VAG_GTYPECD,
              P_VAG_PKG, P_VAG_TON, P_VAG_VOL, P_VAG_REMARK, P_USER_ID,P_SCD_ID);
            }
            catch (Exception e)
            {
                Logger.Instance.Error(this, "写入数据出错", e);
                throw;
            }
        }

        /// <summary>
        /// 得到散货箱量
        /// </summary>
        /// <param name="txtWhere"></param>
        /// <param name="orderText"></param>
        /// <returns></returns>
        public DataTable GetTable(string txtWhere, string orderText)
        {
            try
            {
                return DAL.GetTable(txtWhere, orderText);
            }
            catch (Exception e)
            {
                Logger.Instance.Error(this, "读取数据出错", e);
                throw;
            }
        }

        /// <summary>
        /// 批量删除散货
        /// </summary>
        /// <param name="mList"></param>
        /// <returns></returns>
        public bool DeleteProcessCargomount(List<string> mList)
        {
            return DAL.DeleteProcessCargomount(mList);
        }
    }//end class
}
